﻿package chapter_04_Homework;

public class Work_06_Dog {
	public Work_06_Dog(String string, String string2) {

	}

	public class Work_06_Dog extends Work_06_Pet {
		private String strain;
		public Work_06_Dog(String name,String strain){
			super(name);
			this.strain=strain;
		}
		/**
		 * 重写父类的print（）方法
		 */
		public void print(){
			super.print();
			System.out.println("我是一只"+this.strain+".");
		}
		@Override
		public void eat() {
			// TODO Auto-generated method stub

			super.health=super.health+3;
			System.out.println("狗狗"+super.name+"吃饱啦！健康值增加3");
		}
	}
}
